Fix main build: remove dangling Tool.Execution reference in BuildLegacyWireProtocolTool#1660
Merged
Merged
Conversation
…cyWireProtocolTool Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PranavSenthilnathan
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The break
maincurrently does not compile, and its own Build and Test CI run is red. This blocks PR #1484 and every other PR, because they inherit the brokenmainwhen they merge it.The error comes from
src/ModelContextProtocol.Core/Server/AIFunctionMcpServerTool.cs, insideBuildLegacyWireProtocolTool():across all target frameworks (net10.0/net9.0/net8.0/netstandard2.0). Because
TreatWarningsAsErrors=true, the build fails outright.Root cause — a semantic (logical) merge conflict
dbb7a20) intentionally removed the entire oldTool.Execution/ToolExecutionsurface (task support moved to the new Tasks capability). The removal is baselined insrc/ModelContextProtocol.Core/CompatibilitySuppressions.xml.0663b7c8, the currentmaintip) addedBuildLegacyWireProtocolTool(), which clones theTooland copies every property — including the now-removedExecution. Relax outputSchema to any JSON Schema 2020-12 document per SEP-2106 #1568 was based on an oldermainthat still hadTool.Execution.When #1568 merged on top of #1579, the result was a semantic merge conflict: a dangling
Execution = ProtocolTool.Execution,line referencing a property that no longer exists. No textual git conflict was raised, so it merged red.The fix
Remove the single dangling line from the object initializer in
BuildLegacyWireProtocolTool():Annotations = ProtocolTool.Annotations, - Execution = ProtocolTool.Execution, Icons = ProtocolTool.Icons, Meta = ProtocolTool.Meta,Tool.Executionis not re-added — its removal was the intentional SEP-2663 design, and re-adding it would resurrect a deliberately-removed API and break the compatibility baseline. A fullsrc/grep confirms no other compiled references to a.Executionmember onToolor to the removedToolExecutiontype remain (the only remaining hits are theCompatibilitySuppressions.xmlbaseline entries and unrelated names likeExecutionContext/TryGetOuterToolExecutionActivity).Verification
dotnet build -c Debug— succeeds for all target frameworks, 0 warnings / 0 errors.Sep2106ListToolsBackCompatTests, which exerciseBuildLegacyWireProtocolTool) — 21/21 pass.tests/ModelContextProtocol.Tests(net10.0) — all 2070 non-environment tests pass. The only failures are pre-existing, environment-dependent tests unrelated to this change (stdio tests that spawnTestServer.exe, which isn't onPATHhere, and a Docker-dependent test).This unblocks PR #1484 and all other PRs by getting
maingreen again.